package com.aaa.result;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;

/**
 * @author ：刘涛
 * @date ：Created in 2021/1/27 14:21
 * @description：返回参数实体类
 * @modified By：
 * @version:
 */
@Data
@AllArgsConstructor
public class Result implements Serializable {

    private Integer code;
    private String message;
    private Object data;

    public static com.aaa.result.Result success(String message){
        return new com.aaa.result.Result(200,message,null);
    }
    public static com.aaa.result.Result success(Object data){
        return new com.aaa.result.Result(200,"success",data);
    }
    public static com.aaa.result.Result error(String message){
        return new com.aaa.result.Result(400,message,null);
    }

}
